{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
    <form action="/api/goods" method="post" enctype="multipart/form-data">
        <div class="form-group">
            {% csrf_token %}
            {% for field in form %}
                {% if not field.name == 'image' %}
                    <p>{{ field.form }}</p>
                {% else %}
                    {{ field.label }}<img src="{{ MEDIA_URL }}{{ field.image }}" height="200" width="200">
                {% endif %}
            {% endfor %}
        </div>
        <button type="submit" class="btn btn-default" id="tijiao">提交</button>
    </form>
    <div style="color: aqua">{{ msg }}</div>
</body>
</html>